#pragma once

class GVFField
{
public:
	enum grad_method {
		SCHARR_METHOD,
		SOBEL_METHOD,
		STORED_GVF
	};
	GVFField(std::string in_file);
	GVFField(std::string in_img, grad_method method, int in_iter=800, double in_mu=0.2, double in_factor=-1);
	~GVFField(void);

	friend std::ostream &operator<<(std::ostream &pipe, GVFField &out);
	friend std::istream &operator>>(std::istream &pipe, GVFField &in);

	void normalize(double min=-1, double max=1);

	cv::Mat src;		//image to be read
	cv::Mat src_gray;	//grayscale conversion of src
	cv::Mat grad;		//gradient of image
	cv::Mat u,v;		//resulting GVF fields
};

